//
//  ST_UIView+FlyTransaction.swift
//  BTVideo
//
//  Created by DouLei on 2019/10/8.
//  Copyright © 2019 DouLei. All rights reserved.
//


extension UIView{
    
    /**
     【类似Zenly的动画】 设置动画结束的frame
     */
    static func zenly_animate(withDelay delay: TimeInterval = 0,animations: @escaping () -> Void,completion: ((Bool) -> Void)? = nil)  {
        
        UIView.animate(withDuration: 0.35, delay: delay, usingSpringWithDamping: 0.7, initialSpringVelocity: 7, options:  UIView.AnimationOptions.allowUserInteraction, animations: {
            
            animations()
            
        }) { (f) in
            completion?(f)
        }
        
        
    }
    
}
